import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class TestThreadsWithJDBC {
    
    public static void main(String args[]){
        
        Connection conn = null;
        
        try {
            conn = DriverManager.getConnection("jdbc:derby://localhost:1527/Lesson22");
        } catch (SQLException e) {
            System.out.println("SQL Error: " + e.getMessage() +
                    " code: " + e.getErrorCode());
        }

        MarketNews mn = new MarketNews("Market News");
        Portfolio p = new Portfolio("Portfolio data",conn);

        p.start();
        mn.start();
                             
   }
}